From 17f36279cf62758a6c397faafa701c831cc0c7db Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 27 Nov 2010 14:18:54 +0000 Subject: [PATCH] $options doesn't exist in PurgeList Change to getOptions, and addOption in Constructor --- maintenance/doMaintenance.php | 2 +- maintenance/purgeList.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index bf51c2c3b1..794776decf 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -69,7 +69,7 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) { $callback = MW_CONFIG_CALLBACK; # PHP 5.1 doesn't support "class::method" for call_user_func, so split it if ( strpos( $callback, '::' ) !== false ) { - $callback = explode( '::', $callback, 2); + $callback = explode( '::', $callback, 2 ); } call_user_func( $callback ); } elseif ( file_exists( "$IP/wmf-config/wikimedia-mode" ) ) { diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php index 9842c7aef1..e75e2d7713 100644 --- a/maintenance/purgeList.php +++ b/maintenance/purgeList.php @@ -26,6 +26,7 @@ class PurgeList extends Maintenance { public function __construct() { parent::__construct(); $this->mDescription = "Send purge requests for listed pages to squid"; + $this->addOption( 'purge', 'Whether to update page touched.' , false, false ); } public function execute() { @@ -42,7 +43,7 @@ class PurgeList extends Maintenance { $url = $title->getFullUrl(); $this->output( "$url\n" ); $urls[] = $url; - if ( isset( $options['purge'] ) ) { + if ( $this->getOptions( 'purge' ) ) { $title->invalidateCache(); } } else { -- 2.20.1